package com.hms.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.hms.dao.ICustomerContactDao;
import com.hms.entity.TdCustomerContact;

/**
 * 标题、简要说明. <br>
 * 类详细说明.
 * <p>
 * Copyright: Copyright (c) 2013-4-18 下午3:37:29
 * <p>
 * <p>
 * 
 * @author wangpinzhuang
 * @version 1.0.0
 */

@Component
public class CustomerContactDao extends BaseDao<TdCustomerContact, String> implements ICustomerContactDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<TdCustomerContact> getContactByCustomerId(String customerId) {
		String hql = " from TdCustomerContact contact where contact.customer.customerId=?";
		return super.getSession().createQuery(hql).setParameter(0, customerId).list();
	}

}
